package de.upb.messerschmidt.set.entity;

import java.util.ArrayList;
import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * An Attendees is a {@link Person} (as String) that attends to an {@link Event}
 * (as String, too) with a status (attending, maybe attending, not attending).
 * 
 * @author Tim Messerschmidt
 * 
 */
@PersistenceCapable(detachable = "true")
public class Attendee {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	@Persistent
	private String person;
	@Persistent
	private String event;
	@Persistent
	private String eventStatus;
	@Persistent
	private List<String> talks = new ArrayList<String>();

	/**
	 * @param person
	 * @param event
	 * @param eventStatus
	 */
	public Attendee(String person, String event, String eventStatus) {
		this.person = person;
		this.event = event;
		this.eventStatus = eventStatus;
	}

	/**
	 * @return the key
	 */
	public Key getKey() {
		return key;
	}

	/**
	 * @return the person
	 */
	public String getPerson() {
		return person;
	}

	/**
	 * @return the event
	 */
	public String getEvent() {
		return event;
	}

	/**
	 * @return the eventStatus
	 */
	public String getEventStatus() {
		return eventStatus;
	}

	/**
	 * @return the talks
	 */
	public List<String> getTalks() {
		return talks;
	}

	/**
	 * @param key
	 *            the key to set
	 */
	public void setKey(Key key) {
		this.key = key;
	}

	/**
	 * @param person
	 *            the person to set
	 */
	public void setPerson(String person) {
		this.person = person;
	}

	/**
	 * @param event
	 *            the event to set
	 */
	public void setEvent(String event) {
		this.event = event;
	}

	/**
	 * @param talks
	 *            the talks to set
	 */
	public void setTalks(ArrayList<String> talks) {
		this.talks = talks;
	}

	/**
	 * @param eventStatus
	 *            the eventStatus to set
	 */
	public void setEventStatus(String eventStatus) {
		this.eventStatus = eventStatus;
	}
}
